With the utilization and popularization of digital technology and computer technology, a computer lighting console appears, and subsequently analog and digital communication protocols, for example, D54, AVAB, CMX, PMX, EMX, appears. However, the above mentioned protocol standards are the ones made by various manufacturers, the compatibility among the protocol standards is poor and there is problem about interchangeability among devices. In order to solve the problem about the interchangeability of devices made by different manufacturers, a DMX512 protocol is developed in the early 1980s by United State Institute for Theatre Technology (USITT). The DMX512 protocol is digital multiplex protocol. After formulated and modified, the DMX512 protocol is further developed and formed the DMX512-1990 by the USITT. Now, this control protocol is supported by almost all of the lighting and stage equipment manufacturers, and is widely used as a digital lighting data protocol, so the DMX512-1990 has become the international standard of the lighting control.
The Unified DMX512 protocol makes devices of different manufacturers can connect with each other, and thus the compatibility is greatly improved. Meanwhile, the DMX512 protocol transmits digital signal in serial, and only one signal cable is needed between a console and an equipment, which greatly simplifies the connection cable between the console and the device.
The DMX512 protocol adjusts luminance of lighting equipments by sending data packet on the bus. Extremely stringent rules are done to the timing sequence of each part of the packets according to the DMX512 protocol. Each byte has 11 data bits, wherein, one bit is low level start bit, eight bits are data bits, and two bits are high level stop bits. One frame includes luminance data of one address, so the first frame is the data of the first address, the second frame is the data of the second address, and so 512 frames can transmit data of 512 addresses. Timing sequences of the DMX512 are as shown in FIG. 1.
The details are described in the following table:
slot numberdescriberequirements 1frame start or frame end88 us 2frame start flag8 us 3a whole byte11 bits data 4byte start flag, required to “0”1 bit data 5LSB of a byte1bit data 6MSB of a byte1 bit data 7byte end flag, required to “1”1 bit data 8byte end flag, required to “1”1 bit data 9time width between adjacent bytes, required to “1”<1s10time width between adjacent frames, required to “1”<1s11start byte data of per frame data, required to “0”8 bits data12one byte data, host sending, slave machine receiving8 bits data13a whole frame —
In the standard DMX512 protocol, the data width of each bit is fixed as 4 us, i.e. the transmission rate of the data is 250 Kbps (250 Kbits data are transmitted per second)
Existing protocol decoding method is:
determining the subsequent time width of each byte by detecting time width of the start byte of each frame. Take the standard DMX512 protocol for example, the start byte is consist of one start bit flag (“0”)+eight byte data bits (eight “0”)+two end flags (two “1”). In accordance with standard DMX512 protocol, the width of the start byte is 44 us. Since the nine bits “0” of the start byte are between the frame start flag (“1”) and two byte end flags (two “1”), then the time width of the 9 bits “0” is better to be monitored.
One of the existing approaches is to select a sampling period based on the sample data, for example, several sampling periods T1, T2, T3 are produced by an internal oscillator, and a most suitable sampling period is selected by sampling the start byte. The method is simple, but the decoding error is large for a variety of sample data to select the same sampling period, in particular, the frequency can not be sampled within the full coverage. That is, in certain frequency bands, the data can be sampled, but within certain frequency bands, the data can not be sampled, for example, in frequency band 200˜300 Kbps and 400˜500 Kbps, the data can be sampled, but in frequency band 300˜400 Kbps, the data can not be sampled.
Another approach is to arrange a built-in oscillator (period T) within the slave machine, the time width Tbit of each bit is obtained by counting time of the nine bits “0” of the start byte, for example, the time is T9bits, and then the time T9bits is divided by 9 to obtain the Tbit. Of course, the division operation can be carried out during the sampling process. Because a digital process manner is commonly used in sampling, the time width TN, should be an integer multiple of the oscillator period N*T in order to avoid errors, but in actual situation, the N is generally obtained from T9bits/9, so it is difficult to control the division result to be an integer, for example T9bits/9=8.6.
Now, the common method is to reserve the integer, so for the above data, N=8 is selected, however, during the decoding of each byte, the errors will be accumulated. As shown in FIG. 1, the sampling is usually done in center position of the data byte, the position of a sampling point is N (½+1)T, so that, when the start bit of each byte is decoded, an error is [(8.6−8)/2]T=0.3T; when decoding the first data bit of each byte, error is [(8.6−8)×1.5]T=0.9T; so, when decoding the eighth data bit of each byte, the accumulated error is [(8.6−8)×8.5]T=4.1T; in particular, in an extreme case T9bits/9=8.99, when decoding the eighth data bit of each byte, the accumulated error is 8.5T, thereby, decoding error is generated. So, the position of the sampling point generally is (N/2) T>8.5T to ensure that when decoding the eighth data bit of each byte, the data of the seventh data bit can not be sampled.
However, in order to sample the time width of the start byte more accurately, the frequency of the oscillator of the slave machine is increased continuously as high as possible. Because the higher the frequency is, the smaller the maximum accumulated error resulting from the method of reserving the integer is with respect to the sampling period. In the above example, in the standard DMX512 protocol, time width of each bit is 4 us, if N is equal to 16, then the period of the internal oscillator is 4 us/16=0.25 us, the frequency of the internal oscillator is 4 MHz.
In practical applications, more slave machines are needed to be connected to ensure the refresh rate. That is, the data transfer rate needs to be enhanced. If a higher frequency data needs to be decoded based on the above frequency of the internal oscillator, such as the decoding rate is up to 500 Kbps, then the maximum accumulated error is still 8.5T, but if N=8, the decoding may produce errors. The error can only be overcome by increasing the frequency of the internal oscillator within the chip. The frequency of the internal oscillator is increased from 4 MHz to 8 MHz, and N=16. So, if the decoding rate is up to 1 Mbps, and the frequency of the internal oscillator is at least 16 MHz. However, on the basis of the existing IC, for the frequency up to a MHZ, the higher the frequency is, the harder ensuring the stability of a chip produced at different stage is.
Therefore, the existing transmission protocol decoding method is difficult to ensure the accuracy of decoding due to the accumulated error in of the sampling period, and the method of enhancing the data transmission rate to reduce the decoding error by increasing the frequency of the internal oscillator within the chip is high cost, complicated realization and poor stability.